<?php
// +----------------------------------------------------------------------
// | [ WE ONLY DO WHAT IS NECESSARY ]
// +----------------------------------------------------------------------
// | Author < 931274989@qq.com >
// +----------------------------------------------------------------------
// | Explain 订单表
// +----------------------------------------------------------------------
namespace app\model;

use think\Model;

class Order extends Model
{
  public function user()
  {
    // 关联用户表 一对一
    return $this->belongsTo('user','openid','openid');
  }

  public function xiche()
  {
    // 关联商家表 一对一
    return $this->belongsTo('xiche','shop_id','id');
  }

  public function jiyou()
  {
    // 关联商家表 一对一
    return $this->belongsTo('jiyou','xinghao_id','id');
  }

}
?>